/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 */
'use strict';
import React, {
    Component,
} from 'react';

import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableHighlight,
    Dimensions
} from 'react-native';

import {Actions} from 'react-native-router-flux'
import CommonStyles from '../styles/common';
import ScrollableTabView,{ DefaultTabBar, ScrollableTabBar} from 'react-native-scrollable-tab-view';
import NewsList from './newsList';
import ToolModal from './toolModal'

export default class Tweets extends Component {
    constructor (props) {
        super(props)
    }
    
    render() {
        return (
          <View style={[CommonStyles.container,CommonStyles.vcenter,CommonStyles.hcenter]}>
              {this.props.mainSelectedTab==='tab2'?<ToolModal {...this.props}/>:null}
              <ScrollableTabView style={{width:Dimensions.get('window').width}} renderTabBar={()=><DefaultTabBar underlineColor='#40AA52' activeTextColor='#40AA52' inactiveTextColor='#999'/>}>
                  <NewsList tabLabel="最新动弹" {...this.props}/>
                  <NewsList tabLabel="热门动弹" {...this.props}/>
                  <NewsList tabLabel="我的动弹" {...this.props}/>
              </ScrollableTabView>      
          </View>
        );
    }
}
